package com.u3k.mid;

import com.u3k.app.mid.utils.statistics.StatisticsManager;
import java.io.File;
import java.io.FileInputStream;
import java.util.zip.CRC32;
import java.util.zip.CheckedInputStream;

public class al {
    public static long a(String str) {
        File file = new File(str);
        long value;
        try {
            if (!file.exists()) {
                return 0;
            }
            CheckedInputStream checkedInputStream = new CheckedInputStream(new FileInputStream(file), new CRC32());
            do {
            } while (checkedInputStream.read(new byte[1024]) >= 0);
            value = checkedInputStream.getChecksum().getValue();
            checkedInputStream.close();
            return value;
        } catch (Exception e) {
            LogUtils.a("error", e);
            StatisticsManager.getInstance().logException(ae.a(), e);
            value = 0;
        }
    }
}
